package com.xiaoyu.auth;

import com.alibaba.cloud.seata.feign.SeataFeignClientAutoConfiguration;
import com.xiaoyu.cloud.core.config.CustomLoadBalancerConfiguration;
import com.xiaoyu.common.core.constant.AppConstant;
import com.xiaoyu.user.fallback.UserFallbackFactory;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.loadbalancer.annotation.LoadBalancerClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Import;

/**
 * 微服务权限认证服务启动类
 *
 * @author zxy
 */
//@LoadBalancerClient(name  = "${spring.application.name}",configuration ={ CustomLoadBalancerConfiguration.class})
//@LoadBalancerClient(name  = "${spring.application.name}")
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class, SeataFeignClientAutoConfiguration.class}, scanBasePackages = "com.xiaoyu")
@EnableDiscoveryClient
@MapperScan(AppConstant.AUTH_SERVICE_MAPPER)
@EnableFeignClients(basePackages = {AppConstant.USER_SERVICE_FEIGN_PACKAGES})
@Import(UserFallbackFactory.class)
public class XiaoYuAuthApplication {

    public static void main(String[] args) {
        SpringApplication.run(XiaoYuAuthApplication.class, args);
    }

}
